package com.scs.application.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.TreeEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;
/**
 * <p>
 *
 * </p>
 *
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "院方库位表")
@TableName("base_location")
@EntityIndexAnnotation(ix={"code"})
public class Location extends TreeEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "库位名称",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String name;

    @EntityFieldAnnotation(
            text = "仓库id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String warehouseId;

    @EntityFieldAnnotation(
            text = "库位代码",
            length = "20",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String code;

    @EntityFieldAnnotation(
            text = "库位全称",
            length = "255",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String fullname;


    @EntityFieldAnnotation(
            text = "是否默认 1:是 0:否",
            length = "",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Boolean flagDefault;

    @EntityFieldAnnotation(
            text = "库位识别码",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "库位识别码(不可重复)"
    )
    private String idcode;


    @EntityFieldAnnotation(
            text = "库位类型",
            length = "20",
            not_null = false,
            default_value = "",
            comment = "库位类型(fsd:智能柜，shelves：货架，shouse：智能屋)"
    )
    private String type;

    @TableField(exist = false)
    private String warehouseName;

    @TableField(exist = false)
    private String parentName;

}
